<?php
$v = $data['svalue'];
?><!doctype html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/diy/editor.css" />
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/validate.js?v=1.0"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/ajaxForm.js?v=1.0"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/admin/js/common.js?newversion"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/diy/diy_edit.js"></script>
    <!--upload-->
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.css">
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.js"></script>
    <script type="text/javascript">
        var rowtypedata = [[
            [1, '&nbsp;'],
            [2, '<input style="width:120px;" placeholder="链接名称" class="input" name="title[]" value="" /> <input style="width:300px" placeholder="链接地址" class="input" name="link[]" value=""> <a class="del" onclick="deleterow(this)"></a>'],
        ]];
    </script>
</head>
<body>
<div class="wrap">
    <div class="table_full divScroll" id="div_table" style="width: 100%;">
        <div class="h_a"><p>类型：文字链接组 </p></div>
        <form method="post" class="formvalidate" action="<?php echo $form_url;?>" onsubmit="return false">
            <table class="list tab_label" cellpadding="0" cellspacing="1" border="0" id="general_config">
                <tbody>
                <tr>
                    <th style="width:100px">栏目标题</th>
                    <td colspan="2">
                        <p><input class="input rounded valid" type="text" name="e[name]" value="<?php echo $v['e']['name']?>" style="width:120px" /> <span class="g">如：百宝箱</span></p>
                    </td>
                </tr>
                <tr>
                    <th>链接</th>
                    <td colspan="2">
                        <input style="width:120px;" placeholder="链接名称" class="input" name="title[]" value="<?php echo $v['title'][0]?>" />
                        <input style="width:300px" placeholder="链接地址" class="input" name="link[]" value="<?php echo $v['link'][0]?>">
                        <a class="del" onclick="deleterow(this)"></a>
                    </td>
                </tr>
                <?php
                foreach ((array)$v['title'] as $k => $vv) {
                    if($k ==0){
                        continue;
                    }
                    ?>
                    <tr>
                        <th>&nbsp;</th>
                        <td colspan="2">
                            <input style="width:120px;" placeholder="链接名称" class="input" name="title[]" value="<?php echo $v['title'][$k]?>" />
                            <input style="width:300px" placeholder="链接地址" class="input" name="link[]" value="<?php echo $v['link'][$k]?>">
                            <a class="del" onclick="deleterow(this)"></a>
                        </td>
                    </tr>
                <?php }?>
                <tr>
                    <th>&nbsp;</th>
                    <td colspan="2">
                        <a class="btn_submit" href="javascript:void(0);" onclick="addrow(this,0);$('#div_table').css('height',diy_height);">增加</a>
                        <p class="ored">本站链接请填写相对地址，如：zhoubianyou<br>手机版线路分类填写：mobile/line/?cat=beijing；beijing为目的地拼音<br>外链填绝对地址，如：https://kyfw.12306.cn/otn/leftTicket/init</p>
                    </td>
                </tr>
                <tr>
                    <th>更多(可不填)</th>
                    <td colspan="2">
                        <p>链接名称：<input class="input rounded valid" type="text" name="e[more_name]" value="<?php echo $v['e']['more_name']?>" /> <span class="g">如：更多>></span></p>
                        <p>链接地址：<input class="input rounded w350" type="text" name="e[more_link]" value="<?php echo $v['e']['more_link']?>" /></p>
                        <p class="g">如：国内游：guoneiyou，周边游：zhoubianyou，出境游：chujingyou, 自助游：zizhu</p>
                        <div class="g">
                            链接地址如何获取？
                            在导航上或分类中鼠标移动到链接上，右击复制链接地址，然后将地址粘贴到这里。
                            <p class="ored">填写相对链接即可，如果链接中带域名，需要把域名删除。如：把<?php echo site_url();?>删除</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td colspan="2">
                        <button type="submit" class="btn_submit">保存</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
</body>
</html>